<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\validate;

/**
 * 查看预约验证器
 */
class Reserve extends AdminBase
{
    
    // 验证规则
    protected $rule =   [
        
        'id'                   => 'require',
        'labid'                => 'require',
        'equipid'              => 'require',
        'class'                => 'require',
        'describe'             => 'require',
        'sort'                 => 'require|number',
        'status'               => 'require',
        'create_time'          => 'require',
        'update_time'          => 'require',
    ];

    // 验证提示
    protected $message  =   [
        
        'id.require'              => '编号不能为空',
        'labid.require'           => '实验室不能为空',
        'equipid.require'         => '实验设备不能为空',
        'class.require'           => '班级不能为空',
        'describe.require'        => '描述不能为空',
        'sort.require'            => '排序值不能为空',
         'sort.number'            => '排序值必须为数字',
        'status.require'          => '状态不能为空',
        'create_time.require'     => '创建时间不能为空',
        'update_time.require'     => '过期时间不能为空',
    ];

    // 应用场景
    protected $scene = [
        
        'edit' =>  ['id','labid','equipid','class','describe','sort','status','create_time','update_time'],
    ];
    
}
